import request from '@/utils/request'

// 查询兑换码列表
export function listExchange_code(query) {
  return request({
    url: '/market/exchange_code/list',
    method: 'get',
    params: query
  })
}

// 查询兑换码详细
export function getExchange_code(id) {
  return request({
    url: '/market/exchange_code/' + id,
    method: 'get'
  })
}

// 新增兑换码
export function addExchange_code(data) {
  return request({
    url: '/market/exchange_code',
    method: 'post',
    data: data
  })
}

// 修改兑换码
export function updateExchange_code(data) {
  return request({
    url: '/market/exchange_code',
    method: 'put',
    data: data
  })
}

// 删除兑换码
export function delExchange_code(id) {
  return request({
    url: '/market/exchange_code/' + id,
    method: 'delete'
  })
}
